package com.ttn.student.controller;

import com.ttn.common.core.entity.Result;
import com.ttn.common.core.entity.studentrecord.bo.TestStudyRecordBO;
import com.ttn.student.service.TestStudyRecordService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * (vocabulary_study_record)表控制层
 *
 * @author xxxxx
 */
@RestController
@RequestMapping("/test-study-record")
@Slf4j
public class TestStudyRecordController {
    /**
     * 服务对象
     */
    @Resource
    private TestStudyRecordService testStudyRecordService;

    /**
     * 保存词汇学习记录
     *
     * @param request
     * @param testStudyRecordBO
     * @return
     */
    @PostMapping("/save/test-study-record")
    public Result saveTestStudyRecord(HttpServletRequest request,
                                      @RequestBody TestStudyRecordBO testStudyRecordBO) {
        log.info("TestStudyRecordController saveTestStudyRecord ,参数:{}", testStudyRecordBO);
        return testStudyRecordService.saveTestStudyRecord(testStudyRecordBO);
    }

//    @PostMapping("/query/test-study-record")
//    public Result queryTestStudyRecord(HttpServletRequest request,
//                                       @RequestBody TestStudyRecordQuery testStudyRecordQuery) {
//        log.info("TestStudyRecordController saveTestStudyRecord ,参数:{}", testStudyRecordQuery);
//        return testStudyRecordService.queryTestStudyRecord(testStudyRecordQuery);
//    }

}
